let d  = 10;
let h = 5;
console.log(d*h/2);


let sum = 0;
for (let i =2;i<=100;i+=2){
    sum+=i;
}
console.log(sum);

console.log(Math.floor(Math.random()*10000));

let w = parseInt(window.prompt("请输入绩效分数："));
if (w >=90){
    console.log("考核等级S，奖励3倍工资");
}else if (w>=80){
    console.log("考核等级A，奖励2倍工资");
}else if (w>=70){
    console.log("考核等级B，奖励1倍工资");
}else if (w>=60){
    console.log("等级C，不奖励，需要继续努力");
}else if (w<60){
    console.log("考核等级D，考核较差，需要再观察或者劝退");
}

document.getElementById("parent").onchange = function(){
    document.getElementById("subclass").innerHTML = "";
    for (let t of a ){
        if(t.id==this.value){
            let shang = document.createElement("option");
            shang.innerHTML = t.name;
            let subclass = document.getElementById("subclass");
            subclass.appendChild(shang);
        }
    }
};

for (let item of q){
    console.log(q);
    let goods = document.getElementById("goods-list");
    let tt = document.createElement("tr");

    let html = "<td>"+item.id+"</td><td>"+item.name+"</td><td>￥"+item.price.toFixed(1)+"元</td>";
    tt.innerHTML = html;

    goods.appendChild(tt);
}